package com.carpedil.shirodemo.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 登录日志表
 *
 * @author carpedil
 * @since 2021-01-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Component
public class LoginLog extends Model {

  private static final long serialVersionUID = 1L;

  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;

  /** 登录时间 */
  private LocalDateTime loginTime;

  /** 用户名 */
  private String username;

  /** 登录状态, 0 表示登录失败, 1 表示登录成功. */
  private String loginStatus;

  /** IP */
  private String ip;
}
